<form action="" method="post" class="form_single">
  {include file="layout/top"/}
    <div class="box">
      <div class="box-body">
        <div class="col-md-4" style="margin-bottom: 20px;margin-top: 20px;">
          <div class="form-group">
            <label>离职原因</label>
            <span>（员工离职原因）</span>
            <input class="form-control leave_yy" name="leave_yy" placeholder="请输入离职原因" type="text" >
          </div>
        </div>

        <div class="col-md-4" style="margin-bottom: 20px;margin-top: 20px;">
          <div class="form-group">
            <label>离职时间</label>
            <span class="">（员工离职时间）</span>
              <input type="text" name="leave_time" readonly="readonly" style="cursor:pointer"  class="form-control test-item leave_time" placeholder="请选择时间" >
          </div>
        </div>

        <div class="col-md-4" style="margin-bottom: 20px;margin-top: 20px;">
          <div class="form-group">
           <label>是否交接</label>
            <span>（员工是否交接）</span>
            <select name="leave_status" class="form-control leave_status">
                  <option value="1" >是</option>
                  <option value="2" >否</option>
              </select>
          </div>
        </div>
      </div>
      <div class="box-footer" style="padding-left: 25px;">
        
       <button  type="button" class="btn ajax-submit" id="{$id}" data-style="slide-up" target-form="form_single" style="color:#fff;background:#3c8dbc;">
    <span class="ladda-label"><i class="fa fa-send"></i> 确 定</span>
</button>

      </div>
    </div>
    <script src="__STATIC__/module/admin/laydate/layer.js"></script>
    <script src="__STATIC__/module/admin/js/init_body.js"></script>
    <script src="__STATIC__/module/admin/ext/adminlte/dist/js/app.min.js"></script>
<script src="__STATIC__/module/admin/ext/adminlte/dist/js/init.js"></script>
<script src="__STATIC__/module/common/toastr/toastr.min.js"></script>
<script src="__STATIC__/module/admin/ext/btnloading/dist/spin.min.js"></script>
<script src="__STATIC__/module/admin/ext/btnloading/dist/ladda.min.js"></script>
<script src="__STATIC__/module/admin/ext/remodal/remodal.min.js"></script>
<script src="__STATIC__/module/admin/ext/adminlte/plugins/iCheck/icheck.min.js"></script>
<script src="__STATIC__/module/admin/js/onebase.js"></script>
    <script type="text/javascript">
      // 时间插件
    $('body').delegate('.test-item','click', function(){
    lay('.test-item').each(function(){
    laydate.render({
      elem: this
      ,trigger: 'click'
    });
 });
  });
      $('.ajax-submit').click(function(){
        var id=$(this).attr('id');
        var leave_status=$('.leave_status').val();
        var leave_time=$('.leave_time').val();
        var leave_yy=$('.leave_yy').val();
        $.post('/admin/staff/staffWorkAudits.html',{id:id,leave_yy:leave_yy,leave_status:leave_status,leave_time:leave_time},
          function(data){
            obalert(data);
            setInterval(function(){
                parent.window.location.href='/admin/staff/staffList.html'
            },1000);
            // if(data==1){
            //   layer.msg('导入成功');
            //   setInterval(function(){
            //     parent.window.location.href='/admin/staff/staffrelation.html'
            //   },1000)
            // }else{
            //   layer.msg('导入失败,请检查文件');
            // }
        })
      })
      
    </script>
</form>
